/**
  ******************************************************************************
  * @文件     es8311.h
  * @作者     hero_cao
  * @版本     V1.0.0
  * @日期     2025/06/18
  * @概要     es8311初始化库
  ******************************************************************************
  */
 
 /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __ES8311_H_
#define __ES8311_H_

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>


/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define ES8311_ADDR		0x19              			/* es8311的器件地址 */

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
uint8_t es8311_init(void);  /* es8311初始化 */
void es8311_i2s_cfg(uint8_t fmt, uint8_t len);      /* 设置I2S工作模式 */
void es8311_hpvol_set(uint8_t volume);              /* 设置耳机音量 */
void es8311_adda_cfg(uint8_t dacen, uint8_t adcen); /* es8311 DAC/ADC配置 */
void es8311_mic_gain(uint8_t gain);                 /* es8311 MIC增益设置(MIC PGA增益) */
void es8311_alc_ctrl(uint8_t sel, uint8_t maxgain, uint8_t mingain);    /* es8311 ALC设置 */

#endif /* __ES8311_H_ */
